#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <string.h>
int main()
{
    const char *filename = "record.txt";
    int ret = truncate(filename, 100);
    if(ret == -1)
    {
        printf("truncate failed!\n");
        exit(-1);
    }
    return 0;

}